package edu.lfsfxy.myschool.controller;

import edu.lfsfxy.myschool.entity.Student;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping("/say")
public class TestController {
    @RequestMapping("/hello")
    public String sayHello()
    {
        System.out.println("hello");
        return "success";
    }
    @RequestMapping("/param1")
    public String sayHello(String uid)
    {
        System.out.println(uid);
        return "success";
    }
    @RequestMapping("/param2")
    public String sayHello(String uid,String uname, String sex)
    {
        System.out.println(uid);
        System.out.println(uname);
        System.out.println(sex);
        return "success";
    }
    @RequestMapping("/param4")
    public String sayHello(Student stu)
    {
        /*System.out.println(stu.getUid());
        System.out.println(stu.getUname());*/
        return "success";
    }
}
